﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace SolutionSettings {
    interface ISettingsFile {
        string Filename { get; }

        // TODO: Add properties for settings contents.
    }
    
    interface ISettingsProvider {
        // TODO: Add method to get settings from VS
        ISettingsFile Read(IFileSystem fs, string path);
        void Save(ISettingsFile file, string path = null);
    }

    class DefaultSettingsProvider : ISettingsProvider {
        public class SettingsFile : ISettingsFile {
            public string Filename { get; set; }

            // TODO: Add properties for settings contents.
        }

        public ISettingsFile Read(IFileSystem fs, string path) {
            var file = new SettingsFile {
                Filename = path
            };

            // TODO: Load the settings

            return file;
        }

        public void Save(ISettingsFile file, string path = null) {
            path = path ?? file.Filename;

            // TODO: Save the settings
        }
    }

}
